//
//  OrderDetailRefundTicketCell.m
//  didacar
//
//  Created by 度周末网络-王腾 on 16/1/12.
//  Copyright © 2016年 dzmmac. All rights reserved.
//

#import "OrderDetailRefundTicketCell.h"

@implementation OrderDetailRefundTicketCell


-(void)awakeFromNib{
    UIView *bottomLine = [CommoneTools createLineWithFrame:CGRectMake(0, 43.5, [UIScreen width], 0.45)];
    [self.contentView addSubview:bottomLine];
    
}


-(void)showModel:(RefundTicketEntity *)entity{
    self.left.attributedText = [self getPrice:entity];
    
    
    
    
    
}


-(NSAttributedString *)getPrice:(RefundTicketEntity *)entity{
    NSMutableArray *mutableString = [[NSMutableArray alloc ] init];
    [mutableString addObject:[MainInfoTitleFields getInstaceWithText:entity.ApplyTime hexColor:GLOBLE_GRAY_COLOR_5_HEX fontSize:@"14"]];
    
    if (self.isThrough) {
        [mutableString addObject:[MainInfoTitleFields getInstaceWithText:[NSString stringWithFormat:@" 共%@t张 ",@(entity.TicketNum).stringValue] hexColor:GLOBLE_ORANGE_COLOR_HEX fontSize:@"14"]];
    }else{
        [mutableString addObject:[MainInfoTitleFields getInstaceWithText:[NSString stringWithFormat:@" 共%@t天 ",@(entity.TicketNum).stringValue] hexColor:GLOBLE_ORANGE_COLOR_HEX fontSize:@"14"]];
    }
    
    [mutableString addObject:[MainInfoTitleFields getInstaceWithText:entity.TicketPrice.stringValue hexColor:GLOBLE_ORANGE_COLOR_HEX fontSize:@"14"]];
    return [CommoneTools getAttributeString:mutableString];
}

@end
